/**
 * Copyright (c) 2018-2028, HQY 胡庆一 (215218393@qq.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ocm.product.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ocm.core.mp.base.BaseEntity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 实体类
 *
 * @author HQY
 * @since 2021-11-18
 */
@Data
@TableName("ocm_spu")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Spu对象", description = "Spu对象")
public class Spu extends BaseEntity {

    private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
  	private Long id;

	@NotEmpty(message = "不允许空")
  	private String spuTitle;
    /**
     * 副标题
     */
	@NotEmpty(message = "副标题不允许为空")
    @ApiModelProperty(value = "副标题")
    private String spuInfo;

	/**
	 * 发货地
	 */
	@ApiModelProperty(value = "图片")
	private String spuPlace;
    /**
     * 视频
     */
    @ApiModelProperty(value = "视频")
    private String spuVideo;
    /**
     * 主图（图片数组第一张）
     */
    @ApiModelProperty(value = "主图（图片数组第一张）")
    private String spuThumb;
    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    private String spuImages;
    /**
     * 所属分类
     */
    @ApiModelProperty(value = "所属分类")
	@NotNull(message = "分类不允许空")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long spuCategory;
    /**
     * 邮费
     */
    @ApiModelProperty(value = "邮费")
    private BigDecimal spuPostage;
    /**
     * 店铺ID
     */
    @ApiModelProperty(value = "店铺ID")
    @TableField("shop_id")
	@JsonSerialize(using = ToStringSerializer.class)
  	private Long ShopId;
    /**
     * 图片详情
     */
    @ApiModelProperty(value = "图片详情")
	@JsonSerialize(using = ToStringSerializer.class)
    private String spuDescribe;

    /**
     * 默认1普通商品 2预售商品(定金) 3定时上架普通商品 4秒杀商品
     */
    @ApiModelProperty(value = "默认1普通商品 2预售商品(定金) 3定时上架普通商品 4秒杀商品")
    private Integer spuType;

  	private Date auditTime;

	@JsonSerialize(using = ToStringSerializer.class)
  	private Long auditUser;

	@ApiModelProperty(value = "商品标签")
	private String spuLabel;
    /**
     * 审核员备注
     */
    @ApiModelProperty(value = "审核员备注")
    private String auditRemark;


}
